import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    activePanel: {
      panelId: "",
      panelTitle: "",
    },
    quickMapPanel: {
      panelId: "",
      panelTitle: "",
    },
  },
  getters: {},
  mutations: {
    //设置面板的标题和开关
    setActivePanel(state, val) {
      state.activePanel.panelId = val.panelId;
      state.activePanel.panelTitle = val.panelTitle;
    },
    setQuickPanel(state, val) {
      state.quickMapPanel.panelId = val.panelId;
      state.quickMapPanel.panelTitle = val.panelTitle;
    },
  },
  actions: {},
  modules: {},
});
